import request from '@/utils/request'

// 查询轮播图列表
export function listItem(query) {
  return request({
    url: '/system/item/list',
    method: 'get',
    params: query
  })
}

// 查询轮播图详细
export function getItem(id) {
  return request({
    url: '/system/item/' + id,
    method: 'get'
  })
}
export function getArtList(data) {
  return request({
    url: '/ysp/art/list',
    method: 'post',
    data:data
  })
}


// 新增轮播图
export function addItem(data) {
  return request({
    url: '/system/item',
    method: 'post',
    data: data
  })
}

// 修改轮播图
export function updateItem(data) {
  return request({
    url: '/system/item',
    method: 'put',
    data: data
  })
}
export function updateItemStatus(data) {
  const requestUrldata = {
    id: data.id,
    status : data.status
  }
  return request({
    url: '/system/item',
    method: 'put',
    data: requestUrldata
  })
}

// 删除轮播图
export function delItem(id) {
  return request({
    url: '/system/item/' + id,
    method: 'delete'
  })
}
